/**
 * 
 */
package czolgisci.display;

import javax.swing.JFrame;
import javax.swing.JTextField;

import czolgisci.Engine;

/**
 * @author pillow
 * 
 */
public class GraphicInterface extends JFrame
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	public GraphicInterface(String title)
	{
		setTitle(title);
		setSize(300, 300);
		setDefaultCloseOperation(GraphicInterface.EXIT_ON_CLOSE);
		setVisible(true);

		drawSplash();
	}

	public void createLifeField(String name, int lifes)
	{
	}

	public void updateLifeField(String name, int lifesNum)
	{
	}

	public void endGame(String winnerName)
	{

	}

	private void drawSplash()
	{
		// JTextField player_1 = new JTextField();
		// player_1.setHorizontalAlignment(player_1.LEFT);
		JTextField player_2 = new JTextField();
		player_2.setHorizontalAlignment(JTextField.RIGHT);

		// getContentPane().add(player_1);
		// getContentPane().add(player_2);
		initGame(); // zeby ostrzezenia nie wypluwal.
	}

	private void initGame()
	{
		Engine.getInstance().init(this, getContentPane(), new String[2]);
	}

}
